// 任何一个宏任务在执行之前必须先问下有没有微任务
setTimeout(() => {
    console.log('timeout1');
    Promise.resolve(5).then(
      value => console.log('成功5',value)
    )
});

setTimeout(() => {
  console.log('timeout2');
});


Promise.resolve(3).then(
  value => console.log('成功3',value)
)

Promise.resolve(4).then(
  value => console.log('成功4',value)
)